﻿<ribbon:RibbonWindow x:Class="LoghogInterface.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:ribbon="clr-namespace:Microsoft.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary"
        xmlns:res="clr-namespace:LoghogInterface.Properties"
        xmlns:my="clr-namespace:LoghogInterface"
        Title="{x:Static res:Resources.Loghog}"
		x:Name="RibbonWindow"
		Width="640" Height="480" MinWidth="500" MinHeight="250">

    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="137"/>
            <RowDefinition Height="304*"/>
        </Grid.RowDefinitions>
        <Grid.Resources>
            <my:BoolToVisibilityConverter x:Key="BoolToVisConverter" />
            <my:ViewModel x:Key="VMResource" />
        </Grid.Resources>

        <DataGrid AutoGenerateColumns="False" Grid.Row="1" CanUserDeleteRows="False" Name="dataGrid1"  IsReadOnly="True">
            <DataGrid.Columns>
                <DataGridTextColumn Header="{x:Static res:Resources.ID}" 
                                    Binding="{Binding ID}" 
                                    
                                    Visibility="{Binding  (FrameworkElement.DataContext).ShowID,  
					RelativeSource={x:Static RelativeSource.Self},
						Converter={StaticResource BoolToVisConverter}}" />
                <DataGridTextColumn Header="{x:Static res:Resources.Division}" 
                                    Binding="{Binding Name}"  
                                    Visibility="{Binding  (FrameworkElement.DataContext).ShowDivision,  
					RelativeSource={x:Static RelativeSource.Self},
						Converter={StaticResource BoolToVisConverter}}"/>
                <DataGridTextColumn Header="{x:Static res:Resources.TextEvent}"  
                                    Binding="{Binding Text}" 
                                    Visibility="{Binding  (FrameworkElement.DataContext).ShowTextEvent,  
					RelativeSource={x:Static RelativeSource.Self},
						Converter={StaticResource BoolToVisConverter}}"/>
                <DataGridTextColumn Header="{x:Static res:Resources.Date}"  
                                    Binding="{Binding Date}"  
                                    Visibility="{Binding  (FrameworkElement.DataContext).ShowDate,  
					RelativeSource={x:Static RelativeSource.Self},
						Converter={StaticResource BoolToVisConverter}}"/>
                <DataGridTextColumn Header="{x:Static res:Resources.Tags}"  
                                    Binding="{Binding Tage}" 
                                    Visibility="{Binding  (FrameworkElement.DataContext).ShowTags,  
					RelativeSource={x:Static RelativeSource.Self},
						Converter={StaticResource BoolToVisConverter}}"/>
            </DataGrid.Columns>
        </DataGrid>

        <ribbon:Ribbon x:Name="Ribbon">
            <ribbon:Ribbon.ApplicationMenu>
                <ribbon:RibbonApplicationMenu SmallImageSource="Images\SmallIcon.png">
                    <ribbon:RibbonApplicationMenuItem Header="{x:Static res:Resources.SetEdit}"
                                                      ImageSource="Images\LargeIcon.png"
                                                      Click="SettingsEdit_Click"/>
                    <ribbon:RibbonApplicationMenuItem Header="{x:Static res:Resources.ImportXml}"
                                                      ImageSource="Images\LargeIcon.png"/>
                    <ribbon:RibbonApplicationMenuItem Header="{x:Static res:Resources.ExportXml}"
                                                      ImageSource="Images\LargeIcon.png"/>
                    <ribbon:RibbonApplicationMenuItem Header="{x:Static res:Resources.Exit}"
                                                      ImageSource="Images\LargeIcon.png"/>
                    
                </ribbon:RibbonApplicationMenu>
            </ribbon:Ribbon.ApplicationMenu>
            <ribbon:RibbonTab Header="{x:Static res:Resources.Main}">
                <ribbon:RibbonGroup Header="{x:Static res:Resources.Events}">
                    <ribbon:RibbonButton LargeImageSource="Images\LargeIcon.png"
                                         Label="{x:Static res:Resources.Refresh}" />
                    <ribbon:RibbonButton SmallImageSource="Images\SmallIcon.png"
                                         Label="{x:Static res:Resources.AddEvent}" Click="AddEvent_Click" />
                    <ribbon:RibbonButton SmallImageSource="Images\SmallIcon.png"
                                         Label="{x:Static res:Resources.AddDraft}" />
                </ribbon:RibbonGroup>
                <ribbon:RibbonGroup Header="{x:Static res:Resources.Filtr}">
                    <ribbon:RibbonComboBox IsEditable="True">
                        <ribbon:RibbonGallery SelectedValue="Green"
                          SelectedValuePath="Content"
                          MaxColumnCount="1">
                            <ribbon:RibbonGalleryCategory>
                                <ribbon:RibbonGalleryItem Content="{x:Static res:Resources.ID}"  />
                                <ribbon:RibbonGalleryItem Content="{x:Static res:Resources.Division}" />
                                <ribbon:RibbonGalleryItem Content="{x:Static res:Resources.TextEvent}" />
                                <ribbon:RibbonGalleryItem Content="{x:Static res:Resources.Date}" />
                                <ribbon:RibbonGalleryItem Content="{x:Static res:Resources.Tags}" />
                            </ribbon:RibbonGalleryCategory>
                        </ribbon:RibbonGallery>
                    </ribbon:RibbonComboBox>
                    <ribbon:RibbonTextBox />
                    <ribbon:RibbonButton SmallImageSource="Images\SmallIcon.png"
                                         Label="{x:Static res:Resources.Filtr}"/>
                    <ribbon:RibbonButton SmallImageSource="Images\SmallIcon.png"
                                         Label="{x:Static res:Resources.CanselFiltr}"/>
                </ribbon:RibbonGroup>
            </ribbon:RibbonTab>
            <!-- Вкладка "Вид" -->
            <ribbon:RibbonTab Header="{x:Static res:Resources.View}">
                <ribbon:RibbonGroup Header="{x:Static res:Resources.Collums}">
                    <ribbon:RibbonButton LargeImageSource="Images\LargeIcon.png"
                                         Label="{x:Static res:Resources.OrderCollums}"
                                         Click="RibbonButton_Click"/>
                </ribbon:RibbonGroup>
                <ribbon:RibbonGroup Header="{x:Static res:Resources.WriteCollums}">
                    <ribbon:RibbonCheckBox Label="{x:Static res:Resources.ID}" IsChecked="{Binding ShowID}" >
                    </ribbon:RibbonCheckBox>
                    <ribbon:RibbonCheckBox Label="{x:Static res:Resources.Division}" IsChecked="{Binding ShowDivision}">
                    </ribbon:RibbonCheckBox>
                    <ribbon:RibbonCheckBox Label="{x:Static res:Resources.TextEvent}" IsChecked="{Binding ShowTextEvent}">
                    </ribbon:RibbonCheckBox>
                    <ribbon:RibbonCheckBox Label="{x:Static res:Resources.Date}" IsChecked="{Binding ShowDate}">
                    </ribbon:RibbonCheckBox>
                    <ribbon:RibbonCheckBox Label="{x:Static res:Resources.Tags}" IsChecked="{Binding ShowTags}">
                    </ribbon:RibbonCheckBox>
                </ribbon:RibbonGroup>
            </ribbon:RibbonTab>
            <ribbon:RibbonTab Header="{x:Static res:Resources.TagsEdit}">
                <ribbon:RibbonGroup Header="{x:Static res:Resources.Tags}">
                    <ribbon:RibbonButton LargeImageSource="Images\LargeIcon.png"
                                         Label="{x:Static res:Resources.Refresh}" />
                    <ribbon:RibbonButton LargeImageSource="Images\LargeIcon.png"
                                         Label="{x:Static res:Resources.AddNewTag}" />
                </ribbon:RibbonGroup>
            </ribbon:RibbonTab>
        </ribbon:Ribbon>
        
       
    </Grid>
</ribbon:RibbonWindow>
